<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<jsp:include page="../public/header.jsp"></jsp:include>
<script type="text/javascript">
<!--
	$(function(){
		$("#checkUserName").click(function(){
			$.post('<%=request.getAttribute("home")%>/user/checkUserNameExists',{"t.userName":$("#userName").val()},function(data){
				if(data!=null){
					if(data.userNamestatus){
						alert("用户名应经存在了");
					}
					else{
						alert("还可以注册额");
					}			
				}
			});
		});
	});	
//-->
</script>

<div id="main">
	<div id="primary">
		<div id="content" role="main">

<form action="${home}/user/register" method="post">
	用户名:<input name="t.userName"  id="userName" style="width: 250px">&nbsp;&nbsp;<input type="button" value="检查用户名" id="checkUserName"/><br/><s:fielderror fieldName="userName"/><br/>
	密&nbsp;&nbsp;&nbsp;&nbsp;码:<input name="t.password" type="password" style="width: 250px"><br/><s:fielderror fieldName="password"/><br/>
	密&nbsp;&nbsp;&nbsp;&nbsp;码:<input name="t.password3" type="password" style="width: 250px"><br/><br/>
	邮&nbsp;&nbsp;&nbsp;&nbsp;箱:<input name="t.userEmail"   style="width: 250px"><s:fielderror fieldName="userEmail"/><br/><br/>
	<input type="submit" id="sub" value="注册"><br/>
</form>
</div>
</div>
<jsp:include page="../public/plugs.jsp"></jsp:include>

<jsp:include page="../public/footer.jsp"></jsp:include>
